<html>
<head>
    <meta charset="UTF-8">
    <title>户学教育</title>
    <meta name="keywords" content="户学教育">
    <meta name="Description" content="户学教育"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,  user-scalable=0"/>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/idangerous.swiper.css?t={time()}.{rand(10000,9999999)}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/common.css?t={time()}.{rand(10000,9999999)}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/mine.css?t={time()}.{rand(10000,9999999)}"/>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/elective_center_ordercheck.css?t={time()}.{rand(10000,9999999)}"/>

    <script src="{HOME_THEME_PATH}../gw/js/jquery.min.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript"t src="{THEME_PATH}js/dialog-plus.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery.artDialog.js?t={time()}.{rand(10000,9999999)}&skin=default"></script>
    <script type="text/javascript" src="{THEME_PATH}js/dayrui.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript" src="{HOME_THEME_PATH}../gw/js/le_include_head.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript" src="{HOME_THEME_PATH}../gw/js/elective_center_ordercheck.js?t={time()}.{rand(10000,9999999)}"></script>
    <link rel="icon" href="{HOME_THEME_PATH}../gw/img/f-logo.png" type="image/png" sizes="16x16">

    <script name="baidu-koubei-verification" src="//ikoubei.baidu.com/embed/58ea9664cf897d52f78ec69fff1379d6"></script>

</head>
<body class="elective_center ordercheck">
<div class="main">
    <!-- 头部 -->
    {template "../gw/common.html"}
    <div class="part part1">
        <div class="part-cont">
            <!-- 目录 -->
            <div class="menu-items">
                <a class="menu-item" href="{dr_user_url('home/index')}">个人中心</a>
                <a class="menu-item le-my-order " href="{dr_user_url('pay/myorder')}">我的订单</a>
                 <a class="menu-item" href="{dr_user_url('pay/electivecenter')}">选课中心</a>
                <a class="menu-item" href="{dr_user_url('pay/changepassword')}">修改密码</a>
            </div>
            <!-- 内容 -->
            <div class="cont-items">
                <div class="cont-item count-order">
                    <!-- 订单页面标题 -->
                    <div class="cont4-title">
                        <div class="cont4-main-title">选课中心 - 确认订单</div>
                    </div>
                    <!-- 订单内容 -->
                    <div class="cont4-conts">

                        <div class="cont4-cont">
                            <div class="title">订单</div>
                        </div>

                        <div class="cont4-cont-body">
                            <div class="order-list">
                                <table>
                                    <thead>
                                    <!--
                                        <tr>
                                            <th>Company</th>
                                            <th>Contact</th>
                                            <th>Country</th>
                                        </tr>
                                    -->
                                    </thead>
                                    <tbody>

                                        <tr>
                                            <td class="class-img">
                                                <img src="{if empty($course['cover'])}{HOME_THEME_PATH}../gw/img/demo-order-class.jpg{else}{$course['cover']}{/if}" alt="" class="order-img-box" width="68" height="68">
                                            </td>
                                            <td class="order-items-title">
                                                <div class="order-main-title">{mb_substr($course['title'],0,10,'utf-8')}</div>
                                                <div class="order-sub-title">{$course['course_type']}/{$course['grade']}/{$course['subject']}</div>
                                            </td>
                                            <td class="order-date">{date('Y.m.d',$course['addtime'])}</td>
                                            <td class="order-price">
                                                <div class="order-original-price">{$course['course_price']}</div>
                                                <!-- <div class="order-special-price">1088.0</div> -->
                                            </td>
                                            <td class="order-num">
                                                <div class="order-num-box">
                                                    <button class="add">+</button>
                                                    <span class="count">1</span>
                                                    <button class="reduce">-</button>
                                                </div>
                                            </td>
                                            <td class="order-price-total">
                                                <div class="order-total-price price"></div>
                                            </td>
                                        </tr>

                                    </tbody>

                                    <tfoot>

                                        <!--<tr>-->
                                            <!--<td class="class-coupon" colspan="6">-->
                                                <!--<div class="class-coupon-box">-->
                                                    <!--<div class="coupon-word">-->
                                                        <!--使用优惠券：-->
                                                    <!--</div>-->

                                                    <!--<div class="coupon-price">-->
                                                        <!--<span class="sign">¥</span>-->
                                                        <!--<span class="dolor">20</span>-->
                                                    <!--</div>-->
                                                <!--</div>-->
                                            <!--</td>-->
                                        <!--</tr>-->

                                        <tr>
                                            <td class="total-price" colspan="6">
                                                <div class="total-price-box">
                                                    <div class="total-price-word">
                                                        费用总计：
                                                    </div>

                                                    <div class="total-prices-price">
                                                        <span class="sign">¥</span>
                                                        <span class="dolor"></span>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td class="buy" colspan="6">
                                                <a class="buy-btn" href="javascript:;" onclick="createorder({$course['id']})">确认订单</a>
                                            </td>
                                        </tr>
                                    </tfoot>


                                </table>



                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页尾 -->
    {template "../gw/footer.html"}
</div>


<!-- 滑动验证窗口 -->
<div class="slide-box">
    <div class="slide-box-wrap">
        <div class="foo-box">
            <div id="foo"></div>
        </div>
    </div>
</div>

</body>
<script src="{HOME_THEME_PATH}../gw/js/idangerous.swiper.min.js?t={time()}.{rand(10000,9999999)}"></script>
<!--<script src="{HOME_THEME_PATH}../gw/js/area.js?t={time()}.{rand(10000,9999999)}"></script>-->
<!--<script src="{HOME_THEME_PATH}../gw/js/alloy-crop.js?t={time()}.{rand(10000,9999999)}"></script>-->
<script src="{HOME_THEME_PATH}../gw/js/lrz.mobile.min.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/mine.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/iscroll.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/unlock.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/jquery.slideunlock.min.js?t={time()}.{rand(10000,9999999)}"></script>
<script>
    function createorder(course_id) {
        var count = $(".count").text();
        var total_price = $(".dolor").text();
        if(count<1){
            alert('数量不能小于1');
            return false;
        }
        if(total_price<0){
            alert("价格不对");
            return false;
        }
        if(!course_id){
            alert("课程id不能为空");
            return false;
        }
        window.location.href = "index.php?s=user&c=order&m=createOrder&course_id="+course_id+"&count="+count+"&total_price="+total_price;
        // window.location.href = "{dr_user_url('order/createOrder',array(course_id=>"+course_id+",count=>"+count+",total_price=>"+total_price+"))}";
    }
</script>
</html>